<? include 'server_config.php'; 

if($_SESSION['user_idx'] == "")
{
	return;
}
?>

		
			<!--div style='height:2px;width:100%;background:#cccccc;float:left;'><span><span></div>
			<div style='height:3px;width:100%;float:left;'><span><span></div>
			<div style='height:1px;width:100%;background:#cccccc;float:left;'><span><span></div-->

<?

				$sql ="

					SELECT A.test_idx, B.name, A.reg_date, A.desc, A.no_desc
					FROM ndd_test A, ndd_list_test B
					WHERE A.user_idx = $user_idx
						AND A.list_test_idx = B.list_test_idx
					ORDER BY A.reg_date DESC;
					";

				$result = mysql_query($sql,$connect);

				while($row = mysql_fetch_row($result))
				{
					$test_idx = $row[0];
					$name = $row[1];
					$reg_date = $row[2];
					$desc = $row[3];
					$no_desc = $row[4];

?>

			<div style='width:100%;float:left;'>
				<div style='width:15px;height:70px;float:left;'></div>
				<div style='width:50px;height:70px;float:left; '>
					<img src="./img/BA-icon-2-R.png">
				</div>
				<div style='width:350px;height:25px;float:left;padding-left:10px; '>
					<span id='article_content'><?=$name?></span>
				</div>

				<div style='width:50px;height:25px;float:right; text-align:right;'>
					<a onclick="if(confirm('<?=$name?>(<?=$reg_date?>)을 정말 삭제하시겠습니까?')) 
						iframe_temp.location.href='ndd_cure_test_del.php?test_idx=<?=$test_idx?>';" 
						style='cursor:pointer;'>삭제</a>
				</div>

				<div style='width:350px;height:20px;float:left;padding-left:10px; '>
					<?=$reg_date?>
				</div>
				<div style='width:550px;float:left;padding-left:10px; '>
					<?
						if($no_desc=="Y") 
							echo "추가 설명을 듣지 못했습니다.";
						else
							echo $desc;
					?>
				</div>
			
			</div>

			<div style="width:100%;height:15px;float:left;"><span></span></div>

			<div style="width:100%;height:1px;background:#CCCCCC;float:left;"><span></span></div>
			<div style="width:100%;height:2px;background:#ffffff;float:left;"><span></span></div>

			<div style="width:100%;height:15px;float:left;"><span></span></div>
<?
				
				}

				?>